#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int i, j, N;
	double S, n;
	S = 1;
	scanf("%d", &N);
	for (i = 1; i <= N; i++)
	{
		n = 1;
		for (j = 1; j <= i; j++)
		{
			n = n * j;
		}
		S += 1.0 / n;
	}
	printf("%.8f", S);
	return 0;
}